package youcaihuaoa.weetop.com.ui.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.robot.base.model.GroupAddBean
import youcaihuaoa.weetop.com.R

class MessageGroupAddAdapter :
    BaseQuickAdapter<GroupAddBean, BaseViewHolder>(R.layout.app_item_message_group_add) {
    override fun convert(holder: BaseViewHolder, item: GroupAddBean) {
        holder.setText(R.id.item_tv_head, item.title?.first().toString())
            .setText(R.id.item_tv_name, item.title ?: "")
            .setText(R.id.item_tv_people_num, "${item.count_num ?: 0}人")
            .setGone(R.id.item_v_line, holder.adapterPosition == data.size - 1)
    }
}